﻿<template>
  <div>
    <a-card :bordered="false" v-if="VisPage == 1">
      <!-- <div class="table-operator">
      <a-button type="primary" icon="plus" @click="hanldleAdd()" v-if="hasPerm('invoicedetail.Add')">新建</a-button>
      <a-button
      v-if="hasPerm('invoicedetail.Delete')"
        type="primary"
        icon="minus"
        @click="handleDelete(selectedRowKeys)"
        :disabled="!hasSelected()"
        :loading="loading"
      >删除</a-button>
      <a-button type="primary" icon="redo" @click="getDataList()">刷新</a-button>
    </div> -->

      <div class="table-page-search-wrapper">
        <!-- <a-form layout="inline">
        <a-row :gutter="10">
          <a-col :md="4" :sm="24">
            <a-form-item label="查询类别">
              <a-select allowClear v-model="queryParam.condition">
                <a-select-option key="MerchantName">客户名称</a-select-option>
                <a-select-option key="ServiceProviderName">服务商名称</a-select-option>
                <a-select-option key="InvoiceType">发票类型</a-select-option>
                <a-select-option key="Invoicesubject">开票科目名称</a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="24">
            <a-form-item>
              <a-input v-model="queryParam.keyword" placeholder="关键字" />
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="24">
            <a-button type="primary" @click="() => {this.pagination.current = 1; this.getDataList()}">查询</a-button>
            <a-button style="margin-left: 8px" @click="() => (queryParam = {})">重置</a-button>
          </a-col>
        </a-row>
      </a-form> -->
        <a-comment style="background-color: #80c4ff; border-radius: 6px">
          <template #author><a>管理员</a></template>
          <template #avatar>
            <a-avatar src="https://joeschmoe.io/api/v1/random" alt="Han Solo" />
          </template>
          <template #content>
            <p>1.勾选多个订单或单个订单</p>
            <p>2.开票申请</p>
            <p>3.发票信息</p>
          </template>
          <template #datetime>
            <a-tooltip :title="1">
              <!-- <span>{{ dayjs().fromNow() }}</span> -->
            </a-tooltip>
          </template>
        </a-comment>

        <a-row style="margin-top: 50px">
          <a-col :span="8">
            <a-button type="primary" @click="handleInvoice()">批量开票</a-button>
          </a-col>
          <a-col :span="8">选中订单数：{{ ordernum }}</a-col>
          <a-col :span="8">开票金额：{{ invoicemoney }}</a-col>
          <a-col :span="8"></a-col>
        </a-row>
      </div>

      <a-table
        style="margin-top: 50px"
        ref="table"
        :columns="columns"
        :rowKey="(row) => row.Id"
        :dataSource="data"
        :pagination="pagination"
        :loading="loading"
        @change="handleTableChange"
        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
        :bordered="false"
        size="middle"
      >
        <span slot="action" slot-scope="text, record">
          <template>
            <a @click="handleInvoice(record)">开票</a>
            <!-- <a-divider type="vertical" />
          <a-popconfirm title="确定删除吗？"
          v-if="hasPerm('invoicedetail.Delete')"
    ok-text="确定"
    cancel-text="取消"
    @confirm="handleDelete([record.Id])"
    @cancel="cancel"
  >
    <a href="#">删除</a>
  </a-popconfirm> -->
          </template>
        </span>
        <span slot="BatchStatus" slot-scope="text">
          <span v-if="text == '1'"><a-tag color="green">已开票</a-tag></span>
          <span v-else-if="text == '0'"><a-tag color="blue">未开票</a-tag></span>
        </span>
      </a-table>

      <edit-form ref="editForm" :parentObj="this"></edit-form>
    </a-card>

    <a-card :bordered="false" v-else-if="VisPage == 2">
      <div>
        <a-comment style="background-color: #80c4ff; border-radius: 6px">
          <template #author><a>管理员</a></template>
          <template #avatar>
            <a-avatar src="https://joeschmoe.io/api/v1/random" alt="Han Solo" />
          </template>
          <template #content>
            <p style="color: red">1.收获地址为自动选择系统默认地址，如需更改请更改默认地址</p>
          </template>
        </a-comment>

        <p style="margin-top: 20px; font-weight: 600">发票抬头</p>
        <a-table
          style="margin-top: 20px"
          ref="table"
          :columns="InvoiceColumns"
          :rowKey="(row) => row.Id"
          :dataSource="Invoicedata"
          :pagination="Inovicepagination"
          :loading="loading"
          @change="handleTableChange"
          :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
          :bordered="false"
          size="middle"
        >
          <span slot="action" slot-scope="text, record">
            <template>
              <a @click="InvoiceHeadEdit(record)">修改</a>
            </template>
          </span>
        </a-table>

        <br />
        <p style="margin-top: 20px; font-weight: 600">收获地址</p>
        <a-table
          style="margin-top: 20px"
          ref="table"
          :columns="AddressColumns"
          :rowKey="(row) => row.Id"
          :dataSource="Addressdata"
          :pagination="Addresspagination"
          :loading="loading"
          @change="handleTableChange"
          :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
          :bordered="false"
          size="middle"
        >
          <span slot="action" slot-scope="text, record">
            <template>
              <a @click="EditAddress(record)">修改</a>
            </template>
          </span>
          <span slot="IsDefault" slot-scope="text">
            <span v-if="text == 1"><a-tag color="green">默认地址</a-tag></span>
            <span v-else><a-tag color="blue">未设置默认</a-tag></span>
          </span>
        </a-table>
        <p style="margin-top: 20px; font-weight: 600">设置备注</p>
        <div>
          <a-textarea placeholder="请填写备注" v-model="Invoiceentity.Remarks" :rows="3"></a-textarea>
        </div>
        <div style="text-align: right; margin-top: 10px">
          <a-button type="primary" @click="VisPage = 1">上一页</a-button>
          <a-button style="margin-left: 10px" type="primary" @click="afterthree">下一页</a-button>
        </div>
      </div>
    </a-card>

    <a-card :bordered="false" v-else-if="VisPage == 3">
      <div class="container">
        <template>
          <!-- v-for="(item, index) in accountRecharges" -->
          <a-badge class="item mt1" type="primary">
            <!-- :key="index"
        :value="`第 ${index + 1} 张`" -->
            <div class="invoice">
              <div class="invoice-round left">
                <i v-for="item in 15" class="round" :key="item"></i>
                <!-- 
             -->
              </div>
              <div class="invoice-body">
                <div class="invoice-header">
                  <div class="invoice-title">
                    <h1>江西增值税专用发票</h1>
                  </div>
                </div>
                <div class="invoice-date">
                  <span class="yellow"></span>
                  开票日期:{{ NewTime }}
                  <span class="print ml1"> </span>
                </div>
                <table
                  align="center"
                  bgcolor="#cd8846"
                  border="0"
                  cellpadding="4"
                  cellspacing="1.6"
                  class="tabtop13"
                  width="100%"
                >
                  <!-- :key="index" -->
                  <tr>
                    <td colspan="1" rowspan="1" width="1%">
                      <div class="wv">购买方</div>
                    </td>
                    <td colspan="16" width="100%">
                      <div class="row" style="text-align:left">
                        <div class="font-left" style="width: 100%;float:left">
                          <div class="font-justify">名&emsp;&emsp;&emsp;&emsp;称:
                             <span style="color:#8bbdff"> {{this.TotalEntity.merchantinfo[0].customerName}}</span>
                          </div>
                          <div class="font-justify">纳税人识别号:
                            <span style="color:#8bbdff"> {{this.TotalEntity.merchantinfo[0].customTaxIdcd}}</span>
                          </div>
                          <div class="font-justify">地址、&emsp;电话:
                            <span style="color:#8bbdff"> 
                              {{this.TotalEntity.merchantinfo[0].RecipientAddr}}
                              {{this.TotalEntity.merchantinfo[0].customCollectorPhone}}
                              </span>
                          </div>
                          <div class="font-justify">开户行及账户:
                            <span style="color:#8bbdff"> 
                              {{this.TotalEntity.merchantinfo[0].AccountBank}}
                            {{this.TotalEntity.merchantinfo[0].BankNo}}
                            </span>
                          </div>
                        </div>
                        <!-- <div class="font-left" style="width: 80%;float:left">
                          <div class="print block">{{this.TotalEntity.merchantinfo[0].customerName}}</div>
                          <div class="print block">{{this.TotalEntity.merchantinfo[0].customTaxIdcd}}</div>
                          <div class="print block">
                            <span>{{this.TotalEntity.merchantinfo[0].RecipientAddr}}
                              {{this.TotalEntity.merchantinfo[0].customCollectorPhone}}
                            </span>
                          </div>
                          <div class="print block">
                            {{this.TotalEntity.merchantinfo[0].AccountBank}}
                            {{this.TotalEntity.merchantinfo[0].BankNo}}
                          </div>
                        </div> -->
                      </div>
                    </td>

                    <td colspan="1" rowspan="1" width="1%">
                      <div class="text-v">密码区</div>
                    </td>
                    <td colspan="10" rowspan="1" width="10%"></td>
                  </tr>

                  <tr style="height: 200px">
                    <td colspan="7" width="20%" style="vertical-align: top; position: relative">
                      <div>货物或应税劳务、服务名称</div>
                      <div class="block">
                        <span class="print">12121的挂号费</span>
                      </div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div style="position: absolute; bottom: 0; left: 50%; transform: translate(-50%, -50%)">
                        合&emsp;&emsp;&emsp; 计
                      </div>
                    </td>
                    <td colspan="3" width="9%" style="vertical-align: top">
                      <div>规格型号</div>
                      <!-- <div class="block"  ><span></span></div> -->
                    </td>
                    <td colspan="3" width="9%" style="vertical-align: top; position: relative">
                      <div>单位</div>
                      <div>
                        <span class="print">辆</span>
                      </div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                    </td>
                    <td colspan="3" width="9%" style="vertical-align: top; position: relative">
                      <div>数量</div>
                      <div>
                        <span class="print">{{ ordernum }}</span>
                      </div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                    </td>
                    <td colspan="3" width="9%" style="vertical-align: top; position: relative">
                      <div>单价</div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                    </td>
                    <td colspan="3" width="9%" style="vertical-align: top; position: relative">
                      <div>金额</div>
                      <div>
                        <span class="print">{{ invoicemoney }}</span>
                      </div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div style="position: absolute; bottom: 0; left: 50%; transform: translate(-50%, -50%)">
                        <span class="print">￥{{ invoicemoney }}</span>
                      </div>
                    </td>
                    <td colspan="3" width="9%" style="vertical-align: top; position: relative">
                      <div>税率</div>
                      <div>
                        <span class="print">13%</span>
                      </div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                    </td>
                    <td colspan="3" width="9%" style="vertical-align: top; position: relative">
                      <div>税额</div>

                      <div>
                        <span class="print">{{ Taxamount }}</span>
                      </div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div class="block"></div>
                      <div
                        class="block"
                        style="position: absolute; bottom: 0; left: 50%; transform: translate(-50%, -50%)"
                      >
                        <span class="print">￥{{ Taxamount }}</span>
                      </div>
                    </td>
                  </tr>

                  <tr>
                    <td colspan="7">价税合计（大写）</td>
                    <td colspan="21">
                      <div class="row">
                        <div class="col-1" style="text-align: left; padding-left: 1em">
                          <a-row>
                            <a-col :span="12">
                              <span class="print">
                                <i class="el-icon-circle-close"></i>
                                {{BagToTalTaxPrice}}
                              </span>
                            </a-col>
                            <a-col :span="12">
                              （小写）
                              <span class="print">￥{{ TotalTaxPrice }} </span>
                            </a-col>
                          </a-row>
                        </div>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td colspan="1">
                      <div class="wv">销售方</div>
                    </td>
                    <td colspan="16">
                      <div class="row">
                        <div style="width: 100%;text-align:left">
                          <div class="font-justify">名&emsp;&emsp;&emsp;&emsp;称:
                            <span style="color:#8bbdff"> {{this.TotalEntity.serviceinfo.ServiceName}}</span>
                          </div>
                          <div class="font-justify">纳税人识别号:
                            <span style="color:#8bbdff"> {{this.TotalEntity.serviceinfo.UnifiedSocialCreditCode}}</span>
                          </div>
                          <div class="font-justify">地址、&emsp;电话:
                            <span style="color:#8bbdff"> 
                              {{this.TotalEntity.serviceinfo.areaName}}
                              {{this.TotalEntity.serviceinfo.AgentPhone}}
                              </span>
                          </div>
                          <div class="font-justify">开户行及账户:
                            <span style="color:#8bbdff"> 
                              {{this.TotalEntity.serviceinfo.BankName}}
                              {{this.TotalEntity.serviceinfo.AcctNo}}
                              </span>
                          </div>
                        </div>

                        <div class="font-left" style="width: 80%">
                          <div class="print"></div>
                          <div class="print"></div>
                          <div class="print"></div>
                          <div class="print"></div>
                        </div>
                      </div>
                    </td>
                    <td colspan="1">
                      <div class="wv">备注</div>
                    </td>
                    <td class="remarks" colspan="10">
                      <div class="print text">
                        {{Invoiceentity.Remarks}}
                      </div>
                    </td>
                  </tr>
                </table>

                <div class="row jcsa invoice-footer">
                  <a-row>
                    <a-col :span="6">收款人：</a-col>
                    <a-col :span="6">复核：</a-col>
                    <a-col :span="6">开票人：</a-col>
                    <a-col :span="6">销售方：（章）</a-col>
                  </a-row>
                </div>
              </div>
              <div class="invoice-round right">
                <i :key="item" class="round" v-for="item in 15"></i>
              </div>
            </div>
          </a-badge>
        </template>

        <div class="operation row jcsa pb-2">
          <div class="cancel" style="text-align: right">
            <a-button type="primary" @click="VisPage = 2" style="margin-right: 10px">上一页</a-button>
            <a-button type="primary" @click="submitInvocie">提交</a-button>
          </div>
        </div>
      </div>
    </a-card>

    <edit-form ref="editForm" :parentObj="this"></edit-form>
    <edit-invoicehead ref="invoicehead" :parentObj="this"></edit-invoicehead>
  </div>
</template>

<script>
const columns = [
  { title: '企业名称', dataIndex: 'MerchantName', width: '15%' },
  { title: '服务商名称', dataIndex: 'ServiceProviderName', width: '15%' },
  // { title: '任务名称', dataIndex: '', width: '15%' },
  { title: '提交时间', dataIndex: 'CreateTime', width: '20%' },
  { title: '合计金额', dataIndex: 'PaymentOutAmount', width: '15%' },
  { title: '开票状态', dataIndex: 'BatchStatus', width: '10%', scopedSlots: { customRender: 'BatchStatus' } },
  { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' } }
]
const InvoiceColumns = [
  { title: '发票抬头', dataIndex: 'InvoiceRise', width: '20%' },
  { title: '税号', dataIndex: 'TaxRegistrationNo', width: '20%' },
  { title: '电话', dataIndex: 'RegisteredTelephone', width: '20%' },
  { title: '银行', dataIndex: 'DepositBank', width: '20%' },
  { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' } }
]
const AddressColumns = [
  { title: '收件人', dataIndex: 'RecipientName', width: '20%' },
  { title: '电话', dataIndex: 'Phone', width: '15%' },
  { title: '收件地址', dataIndex: 'RecipientAddr', width: '35%' },
  { title: '是否默认', dataIndex: 'IsDefault', width: '15%' , scopedSlots: { customRender: 'IsDefault' } },
  
  { title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' } }
]
import EditForm from './AddressEdit.vue'
import EditInvoicehead from '../../Base_leasesystem_invoiceinformation/leasesystem_invoiceinformation/EditForm.vue'
export default {
  components: {
    EditForm,
    EditInvoicehead
  },
  mounted() {
    let nowDate = new Date()
  let date = {
    year: nowDate.getFullYear(),
    month: nowDate.getMonth() + 1,
    date: nowDate.getDate()
  }
  this.NewTime = date.year + '年' + date.month + '月' + date.date+"日"
    this.getDataList()
  },
  data() {
    return {
      selectEntity:{},
      TotalEntity:{},
      BagToTalTaxPrice:"",
      unit:new Array("仟", "佰", "拾", "", "仟", "佰", "拾", "", "角", "分"),
      batchsubid:'',
      TotalTaxPrice:0,
      Taxamount:0,
      layout: {
        labelCol: { span: 3 },
        wrapperCol: { span: 21 }
      },
      rules:{},
      VisPage:1,
      Invoiceentity:{},
      Addresspagination: {
        current: 1,
        pageSize: 5,
        showTotal: (total, range) => `总数:${total} 当前:${range[0]}-${range[1]}`
      },
      Addressdata:[],
      AddressColumns,
      Invoicedata:[],
      InvoiceColumns,
      ordernum:0,
      invoicemoney:0,
      data: [],
      pagination: {
        current: 1,
        pageSize: 10,
        showTotal: (total, range) => `总数:${total} 当前:${range[0]}-${range[1]}`
      },
      Inovicepagination: {
        current: 1,
        pageSize: 10,
        showTotal: (total, range) => `总数:${total} 当前:${range[0]}-${range[1]}`
      },
      filters: {},
      sorter: { field: 'Id', order: 'asc' },
      loading: false,
      columns,
      queryParam: {},
      selectedRowKeys: [],
      NewTime:"",
      
    }
  },
  methods: {
    toDx(n) {   //阿拉伯数字转换函数
            switch (n) {
              case "0":
                return "零";
              case "1":
                return "壹";
              case "2":
                return "贰";
              case "3":
                return "叁";
              case "4":
                return "肆";
              case "5":
                return "伍";
              case "6":
                return "陆";
              case "7":
                return "柒";
              case "8":
                return "捌";
              case "9":
                return "玖";
            }
    },
    afterthree()
    {
      let realVal = Number(this.invoicemoney * 0.13).toFixed(2)
      this.Taxamount = realVal
      this.TotalTaxPrice = Number(realVal) + Number(this.invoicemoney)
      this.preProfit(this.TotalTaxPrice)
      this.GetInvocieInfo();
      this.VisPage = 3
    },
    //根据Mid获取发票信息
    GetInvocieInfo()
    {
      this.$http.post("Base_leasesystem_invoicedetail/leasesystem_invoicedetail/GetInvoiceInfoByMID",{id : this.batchsubid})
      .then(res=>{
        console.log(res);
        this.TotalEntity = res.Data
      })
    },
    submitInvocie(){
      // this.Invoiceentity.MID = this.MID
      // this.Invoiceentity.MerchantCode = this.selectEntity.MerchantCode
      // this.Invoiceentity.MerchantName = this.selectEntity.MerchantName
      // this.Invoiceentity.ServiceProviderId = this.selectEntity.ServiceProviderId
      // this.Invoiceentity.ServiceProviderName = this.selectEntity.ServiceProviderName
      this.selectEntity.InvoiceAmount = this.TotalTaxPrice
      this.selectEntity.Remarks = this.Invoiceentity.Remarks
      this.selectEntity.TaxAmount = this.Taxamount
      this.selectEntity.InvoiceTaxAmount = this.TotalTaxPrice
      this.selectEntity.Amount = this.invoicemoney
      this.selectEntity.Rate = 13
      this.selectEntity.Id  = null

      this.$http.post("/Base_leasesystem_invoicedetail/leasesystem_invoicedetail/SaveData",this.selectEntity)
      .then(res=>{
        if(res.Success){
          this.$message.success("操作成功")
          this.getDataList()
        }else{
          this.$message.error("操作异常")
        }
      })
    },
    //转大写
    preProfit(e) {
          //输入金额时，限制小数后两位正则表达式
            // var that = this;
            // e.target.value=(e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
            // that.form.investMoney = e.target.value;
         var m = e
    //现在才是重点：阿拉伯数数字转换成中文大写的主要部分
              m *= 100;
              m += "";
              var length = m.length;
              var result = "";
              for (var i = 0; i < length; i++) {
                if (i == 2) {
                  result = "元" + result;
                } else if (i == 6) {
                  result = "万" + result;
                }
                if (m.charAt(length - i - 1) == 0) {
                  if (i != 0 && i != 1) {
                    if (result.charAt(0) != '零' && result.charAt(0) != '元' && result.charAt(0) != '万') {
                      result = "零" + result;
                    }
                  }
                  continue;
                }
                result = this.toDx(m.charAt(length - i - 1)) + this.unit[this.unit.length - i - 1] + result;
              }
              result += result.charAt(result.length - 1) == '元' ? "整" : "";
              
              this.BagToTalTaxPrice = result;
              
            },
    handleTableChange(pagination, filters, sorter) {
      this.pagination = { ...pagination }
      this.filters = { ...filters }
      this.sorter = { ...sorter }
      this.getDataList()
    },
    getDataList() {
      this.selectedRowKeys = []

      this.loading = true
      this.$http
        .post('/Base_leasesystem_invoicedetail/leasesystem_invoicedetail/GetDataListOver', {
          PageIndex: this.pagination.current,
          PageRows: this.pagination.pageSize,
          SortField: this.sorter.field || 'Id',
          SortType: this.sorter.order,
          Search: this.queryParam,
          ...this.filters
        })
        .then(resJson => {
          this.loading = false
          console.log(this.loading)
          this.data = resJson.Data.Data
          const pagination = { ...this.pagination }
          pagination.total = resJson.Total
          this.pagination = pagination
        })
    },
    onSelectChange(selectedRowKeys) {
      this.selectedRowKeys = selectedRowKeys
      let temp = 0
      for(var i=0;i<this.selectedRowKeys.length;i++)
      {
        let obj = {};
         obj = this.data.find((item)=>{ //这里的Data就是上面遍历的数据源
           return item.Id === selectedRowKeys[i]; //筛选出匹配数据
         });
         this.selectEntity = obj;
         temp +=parseFloat(obj.PaymentOutAmount)
      }
      this.ordernum = this.selectedRowKeys.length
      this.invoicemoney = temp
    },
    handleInvoice(row){
      this.selectEntity = row
      this.ordernum = 1
      this.invoicemoney = row.PaymentOutAmount
      this.batchsubid = row.Id;
      this.GetAddress(row)
      this.GetInvoiceHead(row);
      this.VisPage = 2
    },
    //获取发票地址
    async GetAddress(row){
      
      this.$http.post("/Base_leasesystem_invoicedetail/leasesystem_invoicedetail/GetAddressByMID",{ id : row.MID})
      .then(res=>{
        this.Addressdata = res.Data.AddressList
      })
    },
    //获取开票信息
    async GetInvoiceHead(row)
    {
      var temp = {}
       temp.condition = "MID"
       temp.keyword = row.MID
        this.$http.post("/Base_leasesystem_invoiceinformation/leasesystem_invoiceinformation/GetDataList",{Search:temp})
        .then(res=>{
          this.Invoicedata = res.Data
        })
    },
    //开票信息修改
    InvoiceHeadEdit(row)
    {
      this.$refs.invoicehead.openForm(row.Id)
    },
    nextfuc(id) {
				this.$nextTick(() => {
					this.$refs.outsideComponentRef.onConfig(api, id, rowList);
				});
		},
    hasSelected() {
      return this.selectedRowKeys.length > 0
    },
    hanldleAdd() {
      this.$refs.editForm.openForm()
    },
    EditAddress(row) {
      this.$refs.editForm.openForm(row.Id)
    },
    handleDelete(ids) {
      var thisObj = this
      
          return new Promise((resolve, reject) => {
            thisObj.$http.post('/Base_leasesystem_invoicedetail/leasesystem_invoicedetail/DeleteData', ids).then(resJson => {
              resolve()

              if (resJson.Success) {
                thisObj.$message.success('操作成功!')

                thisObj.getDataList()
              } else {
                thisObj.$message.error(resJson.Msg)
              }
            })
          })
    },
    cancel(e) {
      this.$message.error('已取消删除');
    }
  }
}
</script>
<style>
.ant-table-thead > tr > th {
  font-weight: 600;
  color: #333333;
}
</style>

<style lang="less" scoped>
.container {
  width: 100%;
  padding: 0 5rem;
  display: flex;
  flex-direction: column;
  .invoice {
    border: 2px solid #8bbdff;
    width: 100%;
    display: flex;
    font-family: '楷体';
    color: #cd8846; // 409eff

    .invoice-round {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      align-items: center;

      &.left {
        border-right: 2px dashed #8bbdff;
      }
      &.right {
        border-left: 2px dashed #8bbdff;
      }
      .round {
        border: 2px solid #8bbdff;
        border-radius: 50%;
        width: 1.3rem;
        height: 1.3rem;
        display: block;
        margin-bottom: 1rem;
        &:first-child {
          margin-top: 1rem;
        }
      }
    }
    .invoice-body {
      flex: 23;
      padding: 2rem 2rem;
      .invoice-header {
        height: 6rem;
        display: flex;
        justify-content: center;
        align-items: center;
        .invoice-title {
          font-size: 1.3rem;
          > h1 {
            border-bottom: 4px double #cd8846;
            padding: 1rem;
          }
        }
      }
      .invoice-date {
        display: flex;
        justify-content: flex-end;
        align-items: flex-end;
      }
      .invoice-footer {
        margin-top: 1ex;
      }
    }
    // padding: 0 1rem;
    .el-badge {
      width: 100%;
    }
  }
  .operation {
    margin: 1rem;
    width: 100%;
  }
}
.font-left{
  float: left;
}
/* CSS Document */
.tabtop13 {
  margin-top: 13px;

  display: table;
  border-collapse: separate;

  text-indent: initial;
  // border-spacing: 2px;
  border-color: #c87c35 !important;
  border-top-color: #c87c35;
  border-right-color: #c87c35;
  border-bottom-color: #c87c35;
  border-left-color: #c87c35;

  td {
    background-color: #ffffff;
    height: 25px;
    line-height: 150%;
    text-align: center;
  }
}
.font-center {
  text-align: center;
}
.btbg {
  background: #e9faff !important;
}

.title {
  font-family: 微软雅黑;
  font-size: 26px;
  font-weight: bold;
  border-bottom: 1px dashed #c87c35;
  color: #255e95;
}
.titfont {
  font-family: 微软雅黑;
  font-size: 16px;
  font-weight: bold;
  color: #255e95;
  background-color: #e9faff;
}
.text-v {
  width: 1rem;
  margin: 0 auto;
}
.remarks {
  text-align: left !important;
  .text {
    height: 100%;
  }
}
.print {
  font-size: 1rem;
  color: #8bbdff;
}
</style>